package com.ssau.expert.gui.app;

import com.intelli.ray.core.Context;
import com.ssau.expert.Test;
import com.ssau.expert.app.AppConfig;
import com.ssau.expert.app.AppContext;
import com.ssau.expert.core.impl.DatabaseImpl;
import com.ssau.expert.gui.common.Controller;

/**
 * Author: Sergey Saiyan
 * Created: 04.09.13 22:22
 */
public class Application {

    public static void main(String[] args) {
        Class c = Test.class;
        String[] modules = new String[]{"expert-core", "expert-api", "expert-gui"};
        Context context = new Context(modules, "com.ssau.expert");
        AppContext.setContext(context);
        AppConfig.initDefault();
        context.getBean(DatabaseImpl.class).init();
        Controller.get().init();
    }

    public static Context getContext() {
        return AppContext.get();
    }
}
